package com.feibo.tasks;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Description:
 * @Author: zhenglinyong
 * @CreateDate: 2018/12/28 11:03 PM
 **/
@Component
public class TestTask {

    private static final SimpleDateFormat dataFormat = new SimpleDateFormat("HH:mm:ss");

//    @Scheduled(fixedRate = 3000)
    @Scheduled(cron = "* * * * * ?")
    public void testScheduling() {
        System.out.println(dataFormat.format(new Date()));
    }
}
